<template>
	<view class="mainpadding_top">
		<view class="mainpadding_top ffffff" style="padding: 100rpx 0">
			<view class="mainpadding_top flexcolumn">
				<view class="xiaohei bold sanshier">请您对我们的服务进行评价</view>
				<view class="margin_top6 mainpadding flexcenter">
					<view class="flexcolumn margin_right6" @click="comment_status=1">
						<image src="../../static/image/system/pjs1.png" mode="" class="pjimg" v-show="comment_status==1"></image>
						<image src="../../static/image/system/pj1.png" mode="" class="pjimg" v-show="comment_status!=1"></image>
						<view class="strongtext margin_top1" :class="comment_status==1?'xiaohuang':'xiaohui'">非常满意</view>
					</view>
					<view class="flexcolumn margin_right6" @click="comment_status=2">
						<image src="../../static/image/system/pjs2.png" mode="" class="pjimg" v-show="comment_status==2"></image>
						<image src="../../static/image/system/pj2.png" mode="" class="pjimg" v-show="comment_status!=2"></image>
						<view class="strongtext margin_top1" :class="comment_status==2?'xiaohuang':'xiaohui'">满意</view>
					</view>
					<view class="flexcolumn" @click="comment_status=3">
						<image src="../../static/image/system/pjs3.png" mode="" class="pjimg" v-show="comment_status==3"></image>
						<image src="../../static/image/system/pj3.png" mode="" class="pjimg" v-show="comment_status!=3"></image>
						<view class="strongtext margin_top1" :class="comment_status==3?'xiaohuang':'xiaohui'">一般</view>
					</view>
				</view>
				<view class="strongtext xiaohui margin_top6">您的反馈能让我们改进不足，做的更好。</view>
			</view>
		</view>
		<view class="margin_top6 bigbtn" @click="submit">提交</view>
	</view>
</template>

<script>
	const httpRequest = require("@/common/httpRequest.js")
	export default {
		data() {
			return {
				listid:"",
				comment_status:1,//1=非常满意,2=满意,3=一般
			}
		},
		onLoad(options) {
			this.listid = options.id
		},
		methods: {
			submit(){
				httpRequest.request("/api/user/sjComment", 'GET', {
					id:this.listid,
					comment_status:this.comment_status
				}, false, false, true).then(res => {
					httpRequest.toast(res.msg)
					if(res.code==1){
						setTimeout(()=>{
							uni.navigateBack(1)
						},1000)
					}
				})
			}
		}
	}
</script>

<style>
.pjimg{
	width: 76rpx;
	height: 76rpx;
}
</style>
